import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/index'

Vue.use(Router)
const View1 = () =>
    import('@/pages/view1')
const View2 = () =>
    import('@/pages/view2')
const View3 = () =>
    import('@/pages/view3')
const View4 = () =>
    import('@/pages/view4')
const Page404 = () =>
    import('@/pages/404.vue')
export default new Router({
    routes: [
        {
            path: '/',
            component: Index,
            children: [
                {
                    path: '/View1',
                    name: 'view1',
                    component: View1
                }, {
                    path: '/View2',
                    name: 'view2',
                    component: View2
                }, {
                    path: '/View3',
                    name: 'view3',
                    component: View3
                }, {
                    path: '/View4',
                    name: 'view4',
                    component: View4
                },
                {
                    path: '/404',
                    name: 'error',
                    component: Page404
                }
            ]
        },
    ]
})
